package com.example.wpx;

import cn.hutool.http.HttpUtil;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;

public class HelloController {
    public Label output;
    public TextField input;

    @FXML
    public void onButtonClick(ActionEvent actionEvent) {
        String str = input.getText();
        String result = HttpUtil.get("https://qqlykm.cn/api/qq/qq.php?qq="+str);
        String[] list = result.split("<br/>");
        result = "";
        for (String string : list){
            result+=(string+"\n");
        }
        output.setText(result);
    }
}